package com.chanjiedata.changbs.adapter;

import android.content.Context;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.chanjiedata.changbs.R;
import com.chanjiedata.changbs.proto.Recharge;

import java.util.List;

/**
 * 文件名 : ProgressAdapter
 * 创建者 : MangoWang
 * 创建日期 : 2019/11/25 11:50
 * 微信 : MangoWaWang
 * 邮箱 : 763482205@qq.com
 * 描述 : TODO
 */

public class RankAdapter extends BaseQuickAdapter<Recharge.earnings_ranking.List, BaseViewHolder> {
    public RankAdapter(Context context, List<Recharge.earnings_ranking.List> dataList) {
        super(R.layout.item_rank, dataList);
    }

    @Override
    protected void convert(BaseViewHolder helper, Recharge.earnings_ranking.List item) {
        String phoneNumber = item.getLgMemberName().replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2");
        helper.setText(R.id.tv_rownum,"["+item.getRownum()+"]")
                .setText(R.id.tv_phone,phoneNumber)
                .setText(R.id.tv_amount, item.getAmount());
    }
}